import Main from '@/views/Main.vue';

export default {
    module: {
        name: 'cms',
        title: '文章管理',
    },

    router: [
        {
            path: '/cms/article',
            icon: 'ios-folder-outline',
            title: '文章管理',
            name: 'admin-cms-article',
            component: Main,
            children: [
                {
                    path: 'list',
                    title: '文章列表',
                    name: 'admin-cms-article-list',
                    component: resolve => { require(['@/views/cms/article/list.vue'], resolve); }
                },
                {
                    path: 'add',
                    title: '发布文章',
                    name: 'admin-cms-article-add',
                    component: resolve => { require(['@/views/cms/article/add.vue'], resolve); }
                }
            ]
        },
        {
            path: '/cms/category',
            icon: 'ios-folder-outline',
            title: '分类管理',
            name: 'cms-category',
            component: Main,
            children: [
                {
                    path: 'list',
                    title: '分类管理',
                    name: 'cms-category-list',
                    component: resolve => { require(['@/views/cms/category/list.vue'], resolve); }
                }
            ]
        },
    ],

    other_router: [
        {
            path: '/cms/article/edit',
            title: '修改文章',
            name: 'admin-cms-article-edit',
            component: resolve => { require(['@/views/cms/article/edit.vue'], resolve); }
        },
        {
            path: '/cms/article/preview',
            title: '文章预览',
            name: 'admin-cms-article-preview',
            component: resolve => { require(['@/views/cms/article/preview.vue'], resolve); }
        }
    ]
};